package com.example.web.websystem.dao;

import com.example.web.websystem.dao.model.SysUserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SysUserDao {
    int deleteByPrimaryKey(Long userId);

    int insertSelective(SysUserDO record);

    SysUserDO selectByPrimaryKey(Long userId);

    int updateByPrimaryKeySelective(SysUserDO record);


    SysUserDO selectByUsernamePassword(
            @Param("username") String username,
            @Param("password") String password
    );

    List<SysUserDO> listByGroupId(long groupId);

    List<SysUserDO> listNormal();

    List<SysUserDO> listAll();

    int updateIsDeletedByGroupId(@Param("groupId") long groupId, @Param("isDeleted") boolean isDeleted);
}